home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Samples / Managed / Common / dxmutexception.cs < prev    next >
Encoding:
Text File  |  2004-09-27  |  3.7 KB  |  78 lines

  1. //--------------------------------------------------------------------------------------
  2. // File: DXMUTException.cs
  3. //
  4. // Holds all exception classes for the DX Managed Utility Toolkit
  5. //
  6. // Copyright (c) Microsoft Corporation. All rights reserved.
  7. //--------------------------------------------------------------------------------------
  8. using System;
  9. using System.Collections;
  10. using Microsoft.DirectX;
  11. using Microsoft.DirectX.Direct3D;
  12.  
  13. namespace Microsoft.Samples.DirectX.UtilityToolkit
  14. {
  15.     /// <summary>Base class for sample exceptions</summary>
  16.     public class DirectXSampleException : System.ApplicationException 
  17.     {
  18.         public DirectXSampleException(string message) : base(message) {}
  19.         public DirectXSampleException(string message, Exception inner) : base(message, inner) {}
  20.     }
  21.  
  22.     /// <summary>
  23.     /// The No Direct3D exception.  Something really had to go wrong for this to occur.
  24.     /// </summary>
  25.     public class NoDirect3DException : DirectXSampleException
  26.     {
  27.         public NoDirect3DException() : base("Could not initialize Direct3D. You may want to check that the latest version of DirectX is correctly installed on your system.") {}
  28.         public NoDirect3DException(Exception inner) : base("Could not initialize Direct3D. You may want to check that the latest version of DirectX is correctly installed on your system.", inner) {}
  29.     }
  30.     /// <summary>
  31.     /// No compatible devices were found for this application.  
  32.     /// </summary>
  33.     public class NoCompatibleDevicesException : DirectXSampleException
  34.     {
  35.         public NoCompatibleDevicesException() : base("Could not find any compatible Direct3D devices.") { }
  36.         public NoCompatibleDevicesException(Exception inner) : base("Could not find any compatible Direct3D devices.", inner) {}
  37.     }
  38.     /// <summary>
  39.     /// Media couldn't be found
  40.     /// </summary>
  41.     public class MediaNotFoundException : DirectXSampleException
  42.     {
  43.         public MediaNotFoundException() : base("Could not find required media. Ensure that the DirectX SDK is correctly installed.") { }
  44.         public MediaNotFoundException(Exception inner) : base("Could not find required media. Ensure that the DirectX SDK is correctly installed.", inner) {}
  45.     }
  46.     /// <summary>
  47.     /// Creating the device failed
  48.     /// </summary>
  49.     public class CreatingDeviceException : DirectXSampleException
  50.     {
  51.         public CreatingDeviceException() : base("Failed creating the Direct3D device.") { }
  52.         public CreatingDeviceException(Exception inner) : base("Failed creating the Direct3D device.", inner) {}
  53.     }
  54.     /// <summary>
  55.     /// Resetting the device failed
  56.     /// </summary>
  57.     public class ResettingDeviceException : DirectXSampleException
  58.     {
  59.         public ResettingDeviceException() : base("Failed resetting the Direct3D device.") { }
  60.         public ResettingDeviceException(Exception inner) : base("Failed resetting the Direct3D device.", inner) {}
  61.     }
  62.     /// <summary>
  63.     /// Creating the device objects failed
  64.     /// </summary>
  65.     public class CreatingDeviceObjectsException : DirectXSampleException
  66.     {
  67.         public CreatingDeviceObjectsException() : base("Failed creating Direct3D device objects.") { }
  68.         public CreatingDeviceObjectsException(Exception inner) : base("Failed creating Direct3D device objects.", inner) {}
  69.     }
  70.     /// <summary>
  71.     /// Resetting the device failed
  72.     /// </summary>
  73.     public class ResettingDeviceObjectsException : DirectXSampleException
  74.     {
  75.         public ResettingDeviceObjectsException() : base("Failed resetting Direct3D device objects.") { }
  76.         public ResettingDeviceObjectsException(Exception inner) : base("Failed resetting Direct3D device objects.", inner) {}
  77.     }
  78. }